using CthulhuDomain.GameEntities;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;

namespace CthulhuDomain
{
  public class ContentManagerAdapter : IContentManager
  {
    public ContentManager Adaptee { get; set; }
    public ContentManagerAdapter(ContentManager manager)
    {
      Adaptee = manager;
    }
    public IGraphicResource LoadTexture(string assetName)
    {
      return new Texture2DAdapter(Adaptee.Load<Texture2D>(assetName));
    }
    public IGraphicResource LoadFont(string assetName)
    {
      return new SpriteFontAdapter(Adaptee.Load<SpriteFont>(assetName));
    }

    public MatrixConfiguration[] LoadSetUp()
    {
      return Adaptee.Load<MatrixConfiguration[]>("LevelCFG"); 
    }
  }
}